package com.pikaqiu.warehouse.domain.req;

import com.pikaqiu.warehouse.domain.entity.Products;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author: Administrator
 * @Date: 2024/8/14
 */
@Data
public class ProductForm {
    private Integer id;
    private String code;
    private String name;
    private String desc;
    private String unit;
    private Integer category;
    private BigDecimal stock;
    private String image;
    private BigDecimal price;
    private BigDecimal salary;

    public Products toProducts() {
        Products products = new Products();
        products.setId(id);
        products.setCode(code);
        products.setName(name);
        products.setDescription(desc);
        products.setCategory(category);
        products.setPrice(price);
        products.setSalary(salary);
        products.setUnit(unit);
        products.setStock(stock);
        products.setImages(image);
        return products;
    }
}
